Skip to content

Avoid warnings when purging an empty database#12494

Merged
balloob merged 1 commit into
home-assistant:devfrom
amelchio:purge-empty-warning
Feb 18, 2018
Merged

Avoid warnings when purging an empty database#12494
balloob merged 1 commit into
home-assistant:devfrom
amelchio:purge-empty-warning

Conversation

@amelchio
Copy link
Copy Markdown
Contributor

Description:

This hopefully addresses the SQLAlchemy warning mentioned by @balloob in #12448 (review) though I am unable to verify because I do not know how to get the warning.

Anyway, to avoid the warning about an empty IN clause, we now only add the filter for protected states when we actually have some states to protect.

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully.
  • Tests have been added to verify that the new code works.

@balloob
Copy link
Copy Markdown
Member

balloob commented Feb 18, 2018

py.test -W error testfile.py

@balloob balloob merged commit 0d0e0b8 into home-assistant:dev Feb 18, 2018
@balloob balloob mentioned this pull request Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants